<template>
  <div>
    <input type="text" v-model="address.address" />
    <input type="text" v-model="address.detailAddress" />
    <input type="text" v-model="address.tel" />
    <input type="text" v-model="address.nickname" />

		<button @click="handleClick">新增</button>
  </div>
</template>


<script>
export default {
  data() {
    return {
      address: {
        address: "",
        detailAddress: "",
        id: new Date().getTime().toString(),
        tel: "",
        nickname: "",
				isChecked: false
      },
    };
  },
	methods: {
		handleClick() {
			this.$store.commit('ADD_ADDRESS', this.address)
			this.$router.push({ name: 'address' })
		}
	}
};
</script>